don't send links with GPS_A200_Send. (#1295)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 19 Jul 2024 11:53:30 +0000 (05:53 -0600)
committerGitHub <noreply@github.com>
Fri, 19 Jul 2024 11:53:30 +0000 (05:53 -0600)
jeeps/gpsapp.cc

index 5a091e8746a566a20e7bdb59c1cc8edb582942f9..4b1441ed8a4aa46f9a569dee7a9ad1650f8390dc 100644 (file)
@@ -3152,9 +3152,6 @@ int32_t GPS_A200_Send(const char* port, GPS_PWay* way, int32_t n)
   gpsdevh* fd;
   GPS_Packet tra;
   GPS_Packet rec;
-  int32_t i;
-  int32_t len;
-  US  method;
 
   if (!GPS_Device_On(port,&fd)) {
     return gps_errno;
@@ -3172,7 +3169,10 @@ int32_t GPS_A200_Send(const char* port, GPS_PWay* way, int32_t n)
   }
 
 
-  for (i=0; i<n; ++i) {
+  for (int32_t i=0; i<n; ++i) {
+    US  method;
+    int32_t len;
+
     if (way[i]->isrte) {
       method = LINK_ID[gps_link_type].Pid_Rte_Hdr;
 
@@ -3190,6 +3190,8 @@ int32_t GPS_A200_Send(const char* port, GPS_PWay* way, int32_t n)
         GPS_Error("A200_Send: Unknown route protocol");
         return PROTOCOL_ERROR;
       }
+    } else if (way[i]->islink) {
+      continue; // links not supported.  can cause "Route Waypoint was Deleted" and "Received an Invalid WPT" on device.
     } else {
       method = LINK_ID[gps_link_type].Pid_Rte_Wpt_Data;